package com.sname.demoupms.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author 宋贤坤
 * @date 2018/11/15 17:46
 */
@RestController
@RequestMapping("/user")
public class UserController {
    private final int NUM = 100;

    private static final String str = "----------------------***************************---------------------------";

    @RequestMapping("/hello")
    public String hello() {
        String result = str;
        return result;
    }

    @GetMapping("/list")
    public List<Integer> lalala() {
        ArrayList list = new ArrayList();
        for (int i = 0; i < NUM; i++) {
            list.add(new Random().nextInt(1000));
        }
        return list;
    }
}
